14. Follow the Rules

Follow the Rules

QUESTION:

We have talked about how Firebase Storage Security rules look similar to Firebase Realtime Database Security rules, but there are some important differences between the two. Give an example of how Firebase Storage Security rules differ from Firebase Realtime Database Security rules.

ANSWER:

Thanks for sharing!

Some example answers:

  • Storage Security rules have two rules types: allow read and allow write (and allow read, write), whereas Firebase Realtime Database has three rule types: .read, .write. and .validate
  • Firebase Storage Security rules are not cascading, so a value of true for a parent doesn't cause all children to be true. Firebase Realtime Database rules are cascading for .read and .write, so a value of true applies all children below the point where the node was declared true.